package com.google.code.chaotic.dto;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

//

public class CommutingServiceDto implements Serializable {

	/** @uml.property name="id" */
	private String id;

	public Long decodedId;

	/** @uml.property name="origin" */
	private LatLonDto origin;

	/** @uml.property name="destination" */
	private LatLonDto destination;

	/** @uml.property name="departureTime" */
	private Date departureTime;

	/** @uml.property name="arrivalTime" */
	private Date arrivalTime;

	/**
	 * @uml.property name="habits"
	 * @uml.associationEnd multiplicity="(0 -1)" ordering="true"
	 *                     aggregation="composite" inverse=
	 *                     "service:com.google.code.chaotic.dto.HabitInServiceDto"
	 */
	private List<HabitInServiceDto> habits = new ArrayList<HabitInServiceDto>();

	/**
	 * @uml.property name="waypoints"
	 * @uml.associationEnd multiplicity="(0 -1)" ordering="true"
	 *                     aggregation="composite" inverse=
	 *                     "commutingService:com.google.code.chaotic.dto.ServiceWaypointDto"
	 */
	private List<ServiceWaypointDto> waypoints = new ArrayList<ServiceWaypointDto>();

	/** @uml.property name="finalized" */
	private boolean finalized;

	//

	/** @uml.property name="id" */
	public void setId(String id) {
		this.id = id;
	}

	/** @uml.property name="id" */
	public String getId() {
		return id;
	}

	/** @uml.property name="origin" */
	public LatLonDto getOrigin() {
		return origin;
	}

	/** @uml.property name="origin" */
	public void setOrigin(LatLonDto origin) {
		this.origin = origin;
	}

	/** @uml.property name="destination" */
	public LatLonDto getDestination() {
		return destination;
	}

	/** @uml.property name="destination" */
	public void setDestination(LatLonDto destination) {
		this.destination = destination;
	}

	/** @uml.property name="departureTime" */
	public Date getDepartureTime() {
		return departureTime;
	}

	/** @uml.property name="departureTime" */
	public void setDepartureTime(Date departureTime) {
		this.departureTime = departureTime;
	}

	/** @uml.property name="arrivalTime" */
	public Date getArrivalTime() {
		return arrivalTime;
	}

	/** @uml.property name="arrivalTime" */
	public void setArrivalTime(Date arrivalTime) {
		this.arrivalTime = arrivalTime;
	}

	/** @uml.property name="waypoints" */
	public List<ServiceWaypointDto> getWaypoints() {
		return waypoints;
	}

	/** @uml.property name="waypoints" */
	public void setWaypoints(List<ServiceWaypointDto> waypoints) {
		this.waypoints = waypoints;
	}

	/** @uml.property name="habits" */
	public List<HabitInServiceDto> getHabits() {
		return habits;
	}

	/** @uml.property name="habits" */
	public void setHabits(List<HabitInServiceDto> habits) {
		this.habits = habits;
	}

	/** @uml.property name="finalized" */
	public void setFinalized(boolean finalized) {
		this.finalized = finalized;
	}

	/** @uml.property name="finalized" */
	public boolean isFinalized() {
		return finalized;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		result = prime * result + ((origin == null) ? 0 : origin.hashCode());
		return result;
	}
}
